package com.hmall.common.client;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.Order;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("userservice")
public interface AddressAndUserClient {
    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);
    @GetMapping("/user/{id}")
    User findUserById(@PathVariable("id") Long id);
    @PostMapping("/user")
    int updataById(@RequestBody User user);
    @PostMapping("/user/returnMoney")
    int returnMoney(@RequestBody Order order);
}
